<!--
 * @Description: 浮动布局
 * @Author: zzj
 * @Date: 2021-08-17 10:53:39
 * @LastEditors: zzj
 * @LastEditTime: 2021-08-17 14:48:17
-->
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>浮动布局</title>
  <style>
    html {
      font: 12px '微软雅黑';
    }
    body {margin: 0;}
    ul {margin: 0;padding: 0;list-style: none;}
    .wrapper {
      width: 1080px;
      margin: 0 auto;
    }
    .xpsf {
      background-color:mediumpurple;
    }
    .xpsf ul.p_list {

    }
    .xpsf ul.p_list::after {
      content: "";
      display: block;
      clear: both;
    }
    .xpsf ul.p_list > li {
      height: 100px;
      /* float: left; */
    }
    .xpsf ul.p_list > li:nth-child(1) {
      background-color: mediumvioletred;
      width: 100px;
      float: left;
      opacity: .4;
    }
    .xpsf ul.p_list > li:nth-child(2) {
      background-color: mistyrose;
      width: 320px;
      float: left;
      opacity: .4;
    }
    .xpsf ul.p_list > li:nth-child(3) {
      background-color: olivedrab;
      width: 340px;
      float: left;
    }
    .xpsf ul.p_list > li:nth-child(4) {
      background-color: orangered;
      width: 250px;
      float: right;
    }
 .rqtj {
      background-color:lightsalmon;
      height: 300px;
    }
    .jjsh {
      height: 300px;
      background-color: lightseagreen;
    }
  </style>
</head>
<body>
  <!-- 容器 -->
  <div class="container">
    <!-- 新品首发 -->
    <div class="xpsf">
      <!-- 居中 -->
      <div class="wrapper">
        <ul class="p_list">
          <li></li>
          <li></li>
          <li></li>
          <li></li>
        </ul>
      </div>
    </div>
    <!-- 人气推荐 -->
    <div class="rqtj">
      <div class="wrapper">
        人气推荐
      </div>
    </div>
    <!-- 居家生活 -->
    <div class="jjsh">
      <div class="wrapper">
        居家生活
      </div>
    </div>
  </div>
</body>
</html>
